/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const caiwuRouter = {
  path: '/caiwu',
  component: Layout,
  redirect: '/caiwu/weihu/chaxun',
  name: 'Caiwu',
  meta: {
    title: '财务子系统',
    icon: 'money',
    roles: ['财务']
  },
  children: [
    {
      path: 'jiesuan',
      component: () => import('@/views/caiwu/jiesuan/index'), // Parent router-view
      name: 'Jiesuan',
      meta: { title: '自然月结算' },
      redirect: '/caiwu/jiesuan/dongzhan/dongzhan',
      children: [
        {
          path: 'zonggongsi',
          component: () => import('@/views/caiwu/jiesuan/zonggongsi/zonggongsi'),
          name: 'zonggongsi',
          meta: { title: '总公司' }
        },
        {
          path: 'gongsi',
          component: () => import('@/views/caiwu/jiesuan/gongsi/gongsi'),
          name: 'gongsi',
          meta: { title: '公司' }
        },
        {
          path: 'yunying',
          component: () => import('@/views/caiwu/jiesuan/yunying/yunying'),
          name: 'yunying',
          meta: { title: '运营' }
        }
      ]
    },
    {
      path: 'dayin',
      component: () => import('@/views/caiwu/dayin/index'), // Parent router-view
      name: 'Dayin',
      meta: { title: '系统报表打印' },
      redirect: '/caiwu/jiesuan/gsjiesuan/gsjiesuan',
      children: [
        {
          path: 'gongsidayin',
          component: () => import('@/views/caiwu/dayin/gongsidayin/gongsidayin'),
          name: 'gongsidayin',
          meta: { title: '公司' }
        },
        {
          path: 'zonggongsidayin',
          component: () => import('@/views/caiwu/dayin/zonggongsidayin/zonggongsidayin'),
          name: 'zonggongsidayin',
          meta: { title: '总公司' }
        },
        {
          path: 'yunyingdayin',
          component: () => import('@/views/caiwu/dayin/yunyingdayin/yunyingdayin'),
          name: 'yunyingdayin',
          meta: { title: '运营' }
        }
      ]
    }
  ]
}

export default caiwuRouter
